package com.ruoyi.ora.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ora.mapper.SosRosterMapper;
import com.ruoyi.ora.domain.SosRoster;
import com.ruoyi.ora.service.ISosRosterService;

/**
 * SOS名单Service业务层处理
 * 
 * @author liuwp
 * @date 2025-05-20
 */
@Service
public class SosRosterServiceImpl implements ISosRosterService 
{
    @Autowired
    private SosRosterMapper sosRosterMapper;

    /**
     * 查询SOS名单
     * 
     * @param id SOS名单主键
     * @return SOS名单
     */
    @Override
    public SosRoster selectSosRosterById(Long id)
    {
        return sosRosterMapper.selectSosRosterById(id);
    }

    /**
     * 查询SOS名单列表
     * 
     * @param sosRoster SOS名单
     * @return SOS名单
     */
    @Override
    public List<SosRoster> selectSosRosterList(SosRoster sosRoster)
    {
        return sosRosterMapper.selectSosRosterList(sosRoster);
    }

    /**
     * 根据业务主键查询一条记录：SOS名单
     *
     * @param sosRoster SOS名单
     * @return SOS名单
     */
    @Override
    public SosRoster selectOneSosRoster(SosRoster sosRoster)
    {
        return sosRosterMapper.selectOneSosRoster(sosRoster);
    }

    /**
     * 新增SOS名单
     * 
     * @param sosRoster SOS名单
     * @return 结果
     */
    @Override
    public int insertSosRoster(SosRoster sosRoster)
    {
        sosRoster.setCreateTime(DateUtils.getNowDate());
        return sosRosterMapper.insertSosRoster(sosRoster);
    }

    /**
     * 修改SOS名单
     * 
     * @param sosRoster SOS名单
     * @return 结果
     */
    @Override
    public int updateSosRoster(SosRoster sosRoster)
    {
        return sosRosterMapper.updateSosRoster(sosRoster);
    }

    @Override
    public int updateSosRosterCondition(SosRoster sosRoster, SosRoster sosRosterCondition)
    {
        return sosRosterMapper.updateSosRosterCondition(sosRoster, sosRosterCondition);
    }

    /**
     * 批量删除SOS名单
     * 
     * @param ids 需要删除的SOS名单主键
     * @return 结果
     */
    @Override
    public int deleteSosRosterByIds(Long[] ids)
    {
        return sosRosterMapper.deleteSosRosterByIds(ids);
    }

    /**
     * 删除SOS名单信息
     * 
     * @param id SOS名单主键
     * @return 结果
     */
    @Override
    public int deleteSosRosterById(Long id)
    {
        return sosRosterMapper.deleteSosRosterById(id);
    }

    /**
     * 条件删除SOS名单
     *
     * @param sosRoster SOS名单
     * @return 结果
     */
    @Override
    public int deleteSosRosterByCondition(SosRoster sosRoster)
    {
        return sosRosterMapper.deleteSosRosterByCondition(sosRoster);
    }

}
